package com.css.fxfzypg.modules.message.repository.entity;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class MessagePageList {
    private int currentPage;//当前页
    private int pageSize;//当前页的数据量
    private int allNumber;//总数据量
    private List<MessageEntity> messageList=new ArrayList<MessageEntity>();//这一页的全部对象数据
    private int pageNumber;//总页数

    public MessagePageList(int currentPage, int pageSize){
        this.currentPage=currentPage;
        this.pageSize=pageSize;
        pageNumber=(allNumber%pageSize==0?(allNumber/pageSize):(allNumber/pageSize+1));
    }
}
